home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / wnos5src.zip / HARDWARE.H < prev    next >
Text File  |  1993-08-09  |  3KB  |  95 lines

  1. #ifndef    _PC_H
  2. #define    _PC_H
  3. #define _HARDWARE_H
  4.  
  5. #ifndef    _GLOBAL_H
  6. #include "global.h"
  7. #endif
  8.  
  9. #ifndef _SESSION_H
  10. #include "session.h"
  11. #endif
  12.  
  13. #ifdef XXX
  14. #define    NSW    10                /* Number of stopwatch "memories" */
  15.  
  16. struct stopwatch {
  17.     long calls;
  18.     int16 maxval;
  19.     int16 minval;
  20. };
  21.  
  22. extern struct stopwatch Sw[];
  23. #endif
  24.  
  25. struct screen {
  26.     char *save;        /* Screen save buffer */
  27.     int row;        /* Saved cursor location */
  28.     int col;
  29. };
  30. #define    NULLSCREEN    (struct screen *)0
  31.  
  32. /* Macros for disabling and restoring interrupts inline.
  33.  * Since the previous flags are saved on the stack, these macros
  34.  * MUST be called in pairs within a single function.
  35.  */
  36. #define    DISABLE() {asm pushf;asm cli;}
  37. #define    RESTORE() {asm popf;}
  38.  
  39. extern int16 Intstk[];            /* Interrupt stack defined in pcgen.asm */
  40. extern void (*Shutdown[])();    /* List of functions to call at shutdown */
  41. extern int Mtasker;                /* Type of multitasker, if any */
  42.  
  43. /* In 8250.c: */
  44. void asytimer __ARGS((void));
  45.  
  46. /* In scc.c: */
  47. void scctimer __ARGS((void));
  48. void sccstop __ARGS((void));
  49. void sccreact __ARGS((void));
  50.  
  51. /* In pc.c: */
  52. void clrbit __ARGS((unsigned port,char bits));
  53. void ctick __ARGS((void));
  54. int32 divrem __ARGS((int32 dividend,int16 divisor));
  55. INTERRUPT  (*getirq __ARGS((unsigned int)) ) __ARGS((void));
  56. void freescreen __ARGS((struct session *sp));
  57. int getmask __ARGS((unsigned irq));
  58. void ioinit __ARGS((void));
  59. void iostop __ARGS((void));
  60. void kbint __ARGS((void));
  61. int kbread __ARGS((void));
  62. int maskoff __ARGS((unsigned irq));
  63. int maskon __ARGS((unsigned irq));
  64. void newscreen __ARGS((struct session *sp));
  65. void pctick __ARGS((void));
  66. void setbit __ARGS((unsigned port,char bits));
  67. int setirq __ARGS((unsigned irq,INTERRUPT (*handler) __ARGS((void))));
  68. void sysreset __ARGS((void));
  69. void systick __ARGS((void));
  70. void writebit __ARGS((unsigned port,char mask,int val));
  71.  
  72. /* In pcgen.asm: */
  73. INTERRUPT btick __ARGS((void));
  74. void chktasker __ARGS((void));
  75. void chtimer __ARGS((INTERRUPT (*)()));
  76. int32 divrem __ARGS((int32 dividend,int16 divisor));
  77. int16 getss __ARGS((void));
  78. void giveup __ARGS((void));
  79. int kbraw __ARGS((void));
  80. int16 longdiv __ARGS((int16 divisor,int n,int16 *dividend));
  81. int16 longmul __ARGS((int16 multiplier,int n,int16 *multiplicand));
  82. INTERRUPT nullvec __ARGS((void));
  83. void uchtimer __ARGS((void));
  84. int16 clockbits __ARGS((void));
  85.  
  86. /* In stopwatch.asm: */
  87. void swstart __ARGS((void));
  88. int16 stopval __ARGS((void));
  89.  
  90. /* In sw.c: */
  91. void swstop __ARGS((int n));
  92.  
  93. #endif    /* _PC_H */
  94.  
  95.